package com.example.check_oa.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.check_oa.model.mapper.AttendanceMapper;
import com.example.check_oa.model.service.AttendanceService;
import com.example.comment_oa.dubbo.SysDeptServiceDubbo;
import com.example.comment_oa.pojos.SysDept;
import com.example.comment_oa.response.AjaxResponse;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("checkOa/company/attendance")
public class CompanyAttendanceController {
    @Resource
    AttendanceService attendanceService;
    @DubboReference(version = "1.0.0")
    SysDeptServiceDubbo sysDeptServiceDubbo;

    //公司考勤，根据部门查询
    @PostMapping("all/{day}")
    public AjaxResponse all(@PathVariable("day")String day){
        return AjaxResponse.success(attendanceService.all(day));
    }

}
